Millions of people worldwide suffer from neurological injury and disease resulting in profound movement impairment. Often the disability is so severe that it is not possible to feed oneself or readily communicate. A new class of medical system termed brain-machine interfaces (BMIs) has emerged from research labs in the past decade and is now poised to dramatically improve these patients' quality of life. BMIs read out neural electrical activity directly from motor structures in the brain and decode these electrical impulses in order to determine the intended movement. Initial versions of BMI systems that control a computer cursor are now in FDA Phase-I clinical trials, and numerous agencies are actively engaged in clinical translation (e.g., NIH, DARPA, VA). Creating control signals to enable an amputee to feed himself with a prosthetic (robotic) arm and hand will require decoding signals from thousands of electrodes, rather than the hundred or so signals current systems read, as well as encoding thousands of sensor signals from the arm and hand into thousands of artificial neural signals to be written into the brain, which has not yet been attempted. The lack of low-power (so that it can be implanted) electronic circuitry needed to run BMIs' encoding and decoding algorithms (termed codecs) is a fundamental barrier to successful clinical translation. The technologies available until now are too power-hungry (digital) or too algorithmically inflexible (analog) to meet the challenge. Recent advances in neuromorphic engineering make it now possible to build a fully implantable and programmable codec chip. This innovative approach combines digital's and analog's best features-programmability and efficiency-while offering far greater robustness than either. Meanwhile recent advances in neuroscience techniques make it now possible to obtain the knowledge needed to design the right algorithms to run on our codec chip. Optogenetic stimulaton can now be used to drive neurons in macaque cortex and computer vision can now be used to track freely moving monkeys while recording wirelessly. We propose to leverage these recent advances to dramatically increase prosthetic performance through the principled design of: (1) An entirely new class of encoders that can spatio-temporally pattern neural activity via optogenetic techniques. (2) An entirely new class of decoders that can operate in the real world with animals moving freely around in far less constrained settings. (3) An entirely new class of implantable programmable electronics that achieves the level of energy- efficiency required to run these complex algorithms. We will demonstrate our success by having a freely moving primate, with a 96-microelectrode recording array and a 9-channel optogenetic stimulator implanted in its premotor and somatosensory cortex, respectively, control a human-like robotic arm. Our ultimate goal is to realize the neuromorphic engineer's dream: Helping untold millions with neurological injury by replacing damaged neural tissue with chips that work like the brain.